import request from '@/utils/request'

// 获取国标抽样方案信息
export function getNationalstandardInfo(id) {
    return request({
        url: `/api/BaseData/Nationalstandard/${id}`,
        method: 'GET'
    })
}

// 获取国标抽样方案信息列表
export function getNationalstandardList(data) {
    return request({
        url: `/api/BaseData/Nationalstandard`,
        method: 'GET',
        data
    })
}

// 添加国标抽样方案信息
export function createNationalstandard(data) {
    return request({
        url: '/api/BaseData/Nationalstandard',
        method: 'POST',
        data
    })
}

// 更新国标抽样方案信息
export function updateNationalstandard(data) {
    return request({
        url: `/api/BaseData/Nationalstandard/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除国标抽样方案信息
export function delNationalstandardBatch(data) {
    return request({
        url: `/api/BaseData/Nationalstandard/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除国标抽样方案信息
export function delNationalstandard(id) {
    return request({
        url: `/api/BaseData/Nationalstandard/${id}`,
        method: 'DELETE'
    })
}
// 获取所有国标抽样方案信息
export function getNationalstandardAll() {
    return request({
        url: `/api/BaseData/Nationalstandard/All`,
        method: 'GET'
    })
}
// 导出国标抽样方案信息
export function exportData(data) {
    return request({
        url: `/api/BaseData/Nationalstandard/Actions/Export`,
        method: 'GET',
        data
    })
}
// 导入
export function ImportData(data) {
  return request({
    url: '/api/BaseData/Nationalstandard/ImportData',
    method: 'post',
    data
  })
}
// 导入预览
export function ImportPreview(data) {
  return request({
    url: '/api/BaseData/Nationalstandard/ImportPreview',
    method: 'get',
    data
  })
}
// 模板下载
export function TemplateDownload() {
  return request({
    url: '/api/BaseData/Nationalstandard/TemplateDownload',
    method: 'get'
  })
}